    // pages/user/feedback/feedback.js
  
    Page({

    /**
     * 页面的初始数据
     */
    data: {
        desc: "",
        email: ""
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    inputDesc(e) {
        this.setData({
          desc: e.detail.value
        })
      },
      inputEmail(e) {
        this.setData({
          email: e.detail.value
        })
      },
      submit() {
        let rules = [{
          name: "desc",
          rule: ["required", "minLength:8", "maxLength:500"],
          msg: ["请输入问题描述", "问题描述必须8个或以上字符", "问题描述不能超过500个字符"]
        }, {
          name: "email",
          rule: ["required", "isEmail"],
          msg: ["请输入邮箱", "请输入正确的邮箱"]
        }];
        let formData = {
          desc: this.data.desc,
          email: this.data.email
        }
        let checkRes = form.validation(formData, rules);
        if (checkRes) {
            wx.showModal({
                title: '友情提示',
                content: checkRes,
                showCancel: false,
                success(res) {
                }
            });
        }
      }
    })